<?php

namespace Bete\Bootstrap;

use Bete\Foundation\Application;
use Bete\Foundation\ProviderRepository;
use Bete\Console\Request;

class RegisterConsoleProviders
{
    protected $app;

    public function __construct(Application $app)
    {
        $this->app = $app;
    }

    public function bootstrap()
    {
        (new ProviderRepository($this->app))->load();

        $this->app->singleton('request', function($app) {
            return new Request($app);
        });
    }
}
